home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / SpeakFreely / src / libdes / Makefile.sf < prev    next >
Makefile  |  2000-05-18  |  5KB  |  151 lines

  1. # You must select the correct terminal control system to be used to
  2. # turn character echo off when reading passwords.  There a 5 systems
  3. # SGTTY   - the old BSD system
  4. # TERMIO  - most system V boxes
  5. # TERMIOS - SGI (ala IRIX).
  6. # VMS      - the DEC operating system
  7. # MSDOS   - we all know what it is :-)
  8. # read_pwd.c makes a reasonable guess at what is correct.
  9.  
  10. OPTS0= # -DRAND -DTERMIO -DNOCONST
  11.  
  12. # Version 1.94 has changed the strings_to_key function so that it is
  13. # now compatible with MITs when the string is longer than 8 characters.
  14. # If you wish to keep the old version, uncomment the following line.
  15. # This will affect the -E/-D options on des(1).
  16. #OPTS1= -DOLD_STR_TO_KEY
  17.  
  18. # This #define specifies the use of an alternative D_ENCRYPT macro in
  19. # ecb_encrypt.    The choice of macro can make a %20 difference in the
  20. # speed.  Unfortunatly the choise of the best macro appears to be very
  21. # dependant on the compiler and the machine in question.
  22. # For the following combinations use the ALT_ECB option.
  23. # Sparc 2 (cc -O4), sun 3/260 (cc -O4)
  24. # For the following combinations do not use the ALT_ECB option.
  25. # Sparc 2 (gcc2 -O2), sun 3/260 (cc -O2), mvax2 (cc -O), MSDOS (Turbo Cv2)
  26. # For other machines, experiment with changing the option and run
  27. # ./speed to see which is faster.
  28. # DO NOT TURN THIS OPTION ON WHEN COMPILING THIS CODE ON A 64 BIT MACHINE
  29. #OPTS2= -DDES_USE_PTR
  30.  
  31. OPTS= $(OPTS0) $(OPTS1) $(OPTS2)
  32.  
  33. CC=cc
  34. CFLAGS= $(OPTS) $(CFLAG)
  35.  
  36. #CC=gcc
  37. #CFLAGS= -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)
  38.  
  39. LIBDIR=/usr/local/lib
  40. BINDIR=/usr/local/bin
  41. INCDIR=/usr/local/include
  42. MANDIR=/usr/local/man
  43. MAN1=1
  44. MAN3=3
  45. SHELL=/bin/sh
  46. #   Objects stripped to just those needed by Speak Freely
  47. OBJS=           cbc_cksm.o        ncbc_enc.o             \
  48.                            ecb_enc.o         \
  49.                   fcrypt.o                     \
  50.                   set_key.o        str2key.o       
  51.  
  52. GENERAL=COPYRIGHT FILES INSTALL Imakefile README VERSION Makefile \
  53.     times vms.com KERBEROS MODES.DES  GNUmakefile des.man \
  54.     DES.pm DES.pod DES.xs Makefile.PL Makefile.uni typemap t \
  55.     des_crypt.man Makefile.ssl des.doc makefile.bc
  56. DES=    des.c
  57. #TESTING=destest.c speed.c rpw.c
  58. HEADERS=version.h des.h des_locl.h podd.h sk.h spr.h rpc_des.h
  59. LIBDES= cbc3_enc.c cbc_cksm.c cbc_enc.c ncbc_enc.c pcbc_enc.c qud_cksm.c \
  60.     cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c ecb_enc.c  ede_enc.c  \
  61.     enc_read.c enc_writ.c fcrypt.c    ofb64ede.c ofb64enc.c ofb_enc.c  \
  62.     rand_key.c          set_key.c rpc_enc.c  str2key.c  supp.c
  63.  
  64. PERL=    des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl
  65.  
  66. ALL=    $(GENERAL) $(DES) $(TESTING) $(LIBDES) $(PERL) $(HEADERS)
  67.  
  68. DLIB=    libdes.a
  69.  
  70. all: $(DLIB) # destest rpw des speed
  71.  
  72. test:    all
  73.     ./destest
  74.  
  75. $(DLIB): $(OBJS)
  76.     /bin/rm -f $(DLIB)
  77.     ar cr $(DLIB) $(OBJS)
  78.     -if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \
  79.     else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \
  80.     else exit 0; fi; fi
  81.  
  82. destest: destest.o libdes.a
  83.     $(CC) $(CFLAGS) -o destest destest.o libdes.a
  84.  
  85. rpw: rpw.o libdes.a
  86.     $(CC) $(CFLAGS) -o rpw rpw.o libdes.a
  87.  
  88. speed: speed.o libdes.a
  89.     $(CC) $(CFLAGS) -o speed speed.o libdes.a
  90.  
  91. des: des.o libdes.a
  92.     $(CC) $(CFLAGS) -o des des.o libdes.a
  93.  
  94. tags:
  95.     ctags $(DES) $(TESTING) $(LIBDES)
  96.  
  97. tar:
  98.     tar chf libdes.tar $(ALL)
  99.  
  100. shar:
  101.     shar $(ALL) >libdes.shar
  102.  
  103. depend:
  104.     makedepend $(LIBDES) $(DES) $(TESTING)
  105.  
  106. clean:
  107.     /bin/rm -f *.o tags core rpw destest des speed $(DLIB) .nfs* *.old \
  108.     *.bak destest rpw des speed
  109.  
  110. dclean:
  111.     sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
  112.     mv -f Makefile.new Makefile
  113.  
  114. # Eric is probably going to choke when he next looks at this --tjh
  115. install: $(DLIB) des
  116.     if test $(INSTALLTOP); then \
  117.         echo SSL style install; \
  118.         cp $(DLIB) $(INSTALLTOP)/lib; \
  119.         if test -s /bin/ranlib; then \
  120.         /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
  121.         else \
  122.         if test -s /usr/bin/ranlib; then \
  123.         /usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
  124.         fi; fi; \
  125.         chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
  126.         cp des.h $(INSTALLTOP)/include; \
  127.         chmod 644 $(INSTALLTOP)/include/des.h; \
  128.         cp des $(INSTALLTOP)/bin; \
  129.         chmod 755 $(INSTALLTOP)/bin/des; \
  130.     else \
  131.         echo Standalone install; \
  132.         cp $(DLIB) $(LIBDIR)/$(DLIB); \
  133.         if test -s /bin/ranlib; then \
  134.           /bin/ranlib $(LIBDIR)/$(DLIB); \
  135.         else \
  136.           if test -s /usr/bin/ranlib; then \
  137.         /usr/bin/ranlib $(LIBDIR)/$(DLIB); \
  138.           fi; \
  139.         fi; \
  140.         chmod 644 $(LIBDIR)/$(DLIB); \
  141.         cp des $(BINDIR)/des; \
  142.         chmod 711 $(BINDIR)/des; \
  143.         cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
  144.         chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
  145.         cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
  146.         chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
  147.         cp des.h $(INCDIR)/des.h; \
  148.         chmod 644 $(INCDIR)/des.h; \
  149.     fi
  150. # DO NOT DELETE THIS LINE -- make depend depends on it.
  151.